package cn.autumnorange.app.common.provider.cacheannotation.filter;

import org.redisson.api.RedissonClient;

public class SetRedissionFilter extends AbstractRedissionFilter {

    public SetRedissionFilter(RedissonClient redissonClient) {
        super("set",redissonClient);
    }

    @Override
    public Object doFilter(String dataTypeString,String dataKey) {
        if (this.getDataType().equalsIgnoreCase(dataTypeString)) {
            RedissonClient redissonClient =
                    this.getRedissonClient();
           return redissonClient.getSet(dataKey);
        } else {
           return this.getNextRedissionFilter().doFilter( dataTypeString, dataKey);
        }
    }
}
